﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:Root="clr-namespace:Elysium.Theme">
    
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/Elysium.Theme;component/Themes/SharedResources.xaml"/>
    </ResourceDictionary.MergedDictionaries>
    
    <Style x:Key="ButtonsBaseStyle" TargetType="{x:Type ButtonBase}">
        
        <Setter Property="Background" Value="{StaticResource ForegroundHighlight}"/>
        <Setter Property="BorderBrush" Value="{StaticResource ForegroundMiddlelight}"/>
        <Setter Property="BorderThickness" Value="{x:Static Root:Parameters.DefaultThickness}"/>
        <Setter Property="Foreground" Value="{StaticResource Foreground}"/>
        <Setter Property="FontFamily" Value="{x:Static Root:Parameters.FontFamily}"/>
        <Setter Property="FontSize" Value="{x:Static Root:Parameters.ContentFontSize}"/>
        <Setter Property="FontWeight" Value="SemiBold"/>

        <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisualStyle}"/>
        
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Padding" Value="{x:Static Root:Parameters.BoldPadding}"/>
        
        <Setter Property="OverridesDefaultStyle" Value="True"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ButtonBase}">                    
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            TextBlock.Foreground="{TemplateBinding Foreground}"
                            TextBlock.FontFamily="{TemplateBinding FontFamily}"
                            TextBlock.FontSize="{TemplateBinding FontSize}"
                            TextBlock.FontWeight="{TemplateBinding FontWeight}"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
                        <ContentPresenter Margin="{TemplateBinding Padding}"
                                          HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                          RecognizesAccessKey="True"/>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>

        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Background" Value="{StaticResource ForegroundMiddlelight}"/>
                <Setter Property="BorderBrush" Value="{StaticResource ForegroundMiddlelight}"/>
                <Setter Property="Foreground" Value="{StaticResource ForegroundContrast}"/>
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Background" Value="{StaticResource ForegroundLowlight}"/>
                <Setter Property="BorderBrush" Value="{StaticResource ForegroundLowlight}"/>
                <Setter Property="Foreground" Value="{StaticResource ForegroundContrast}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Background" Value="{StaticResource Transparent}"/>
                <Setter Property="BorderBrush" Value="{StaticResource Disabled}"/>
                <Setter Property="Foreground" Value="{StaticResource Disabled}"/>
            </Trigger>
        </Style.Triggers>
        
    </Style>
    
</ResourceDictionary>